﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WarehouseManagement.Domain.Entity;

namespace WarehouseManagement.Domain.DTO.WarehouseSApp
{
    /// <summary>
    /// 反填入库申请DTO 
    /// </summary>
    public class FanWarehouseSAppDto
    {
        /// <summary>
        /// 仓库入库id
        /// </summary>
        public int ShippRequestAppId { get; set; }
        /// <summary>
        /// 单据主题
        /// </summary>
        public string? StorageTopic { get; set; }
        /// <summary>
        /// 单据编号
        /// </summary>
        public string? StorageNumber { get; set; }
        /// <summary>
        /// 单据来源
        /// </summary>
        public string? StorageSource { get; set; }
        /// <summary>
        /// 仓库名称
        /// </summary>
        public string? WName { get; set; }
        /// <summary>
        /// 申请人员
        /// </summary>
        public string? AppName { get; set; }
        /// <summary>
        /// 申请日期
        /// </summary>
        public DateTime? AppDate { get; set; }
        /// <summary>
        /// 入库类别
        /// </summary>
        public string? StorageType { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>
        public string? VName { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? StorageRemark { get; set; }
        /// <summary>
        /// 状态 默认待入库
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 添加人姓名
        /// </summary>
        public string? AddName { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime? AddTime { get; set; }
        /// <summary>
        /// 公司id
        /// </summary>
        public string? Office_Id { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public int? User_Id { get; set; }

        public List<StorageProductDto> list { get; set; }
    }
    public class StorageProductDto
    {
        /// <summary>
        /// 仓库入库产品id
        /// </summary>
        public int StorageProductId { get; set; }
        /// <summary>
        /// 单据编号(仓库入库申请单据编号)
        /// </summary>
        public string? StorageNumber { get; set; }
        /// <summary>
        /// 产品编号
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? PNumber { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        /// 
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? PName { get; set; }
        /// <summary>
        /// 规格型号
        /// </summary>
        /// 
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? PSpec { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        /// 
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? PUnit { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal? PPrice { get; set; }

        /// <summary>
        /// 申请入库数
        /// </summary>
        public int? SPConfirmNum { get; set; }
        /// <summary>
        /// 总金额
        /// </summary>
        public decimal? SumPrice { get; set; }
        /// <summary>
        /// 批号
        /// </summary>
        public string? Batch { get; set; }
        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 有效期
        /// </summary>
        public DateTime? ValidDate { get; set; }
        /// <summary>
        /// 到货日期
        /// </summary>
        public DateTime? ArriveDate { get; set; }
        /// <summary>
        /// 包装方式
        /// </summary>
        public string? WrapName { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
        /// <summary>
        /// 确认入库仓库
        /// </summary>
        public int SumNum { get; set; } = 0;
    }
}
